﻿@namespace ThingsGateway.Admin.Razor
@using ThingsGateway.Admin.Application

<div style="min-height:500px;">
    <TreeView TItem="SysResource" Items="Items" ShowIcon="true" IsVirtualize="true" OnTreeItemClick="OnTreeItemClick" ClickToggleNode ModelEqualityComparer="MenuChoiceDialog.ModelEqualityComparer" />
</div>
<style>
    /*弹窗表格*/
    .dialog-table .modal-body {
        height: 500px;
        overflow: hidden;
    }
    /*弹窗Tree*/
    .dialog-table .listtree-view .tree-view {
        height: 380px;
        overflow: hidden;
        padding-bottom: 10px;
    }
</style>
@code {
    RenderFragment<SysResource> RenderTreeItem => item =>
    @<div class="d-flex flex-fill">
        <span class="flex-fill">@item.Title</span>
        <span class="mx-3">@item.SortCode</span>
        <span class="menu-type">@item.Category.ToDisplayName()</span>
        <span class="menu-text">@ModuleTitle</span>
    </div>;
}
